cPy.Legacy module#
- ModalDialog(ID: str, Caption: str)[source]#
- Show model dialog with text identified ID. ID used to take translation from language xml or just may be shown directly if translation not found.
- GetLastDialogButtonIndex()[source]#
- Show model dialog with text identified ID. ID used to take translation from language xml or just may be shown directly if translation not found.
- DontShowAgain(ID: str, Caption: str)[source]#
- Show dialog with text identified ID. ID used to take translation from language xml or just may be shown directly if translation not found.
- ModalDialogOkCancel(ID: str, Caption: str)[source]#
- Show dialog with text identified ID and two buttons - Ok and Cancel. Returns true if OK pressed, false if Cancel pressed. ID used to take translation from language xml or just may be shown directly if translation not found.
- ModalDialogYesNo(ID: str, Caption: str)[source]#
- Show dialog with text identified ID and two buttons - Yes and No. Returns true if OK pressed, false if Cancel pressed. ID used to take translation from language xml or just may be shown directly if translation not found.
- PressInNextModalDialogs(ButtonIndex: int)[source]#
- You should call PressInNextDialogs(-1) to stop automatical pressing of buttons.
- SetModalDialogCallback(name: str)[source]#
- You may get name of current dialog name using next function
- GetCurrentDialog(ID: str, Caption: str)[source]#
- returns true if you are in dialog now, also it retuns text and cation in current dialog to identify it
- ShowFloatingText(ID: str, FID: int)[source]#
- show non-modal message on screen that will be hidden after some period of time
- SetScriptMessage(msg: str, sparam: str)[source]#
- set script message and params that will be executed
- SetFloatingMessage(x: int, y: int, strMessage: str, strColor: str)[source]#
- set script floating message at point (x,y)
- SetFloatingMessageBox(x: int, y: int, strMessage: str, strColor: str, uType: int)[source]#
- set script floating message box at point (x,y) with uType (windows styles)
- GetCommandStringMessageBox(x: int, y: int, strMessage: str, strColor: str, uType: int)[source]#
- get script floating message box at point (x,y) with uType (windows styles)
- SetFloatingMessageBoxTime(x: int, y: int, strMessage: str, strColor: str, uType: int, Time: int)[source]#
- set script floating message box at point (x,y) with uType (windows styles) Time - time in mls
- ShowMessageWhilePressKey(x: int, y: int, msg: str, tcolor: str, key: int, callback: str)[source]#
- set script message while press key
- ShowMessageWhileTime(x: int, y: int, msg: str, tcolor: str, time: float)[source]#
- set script message while time is present
- OpenWorkSpace()[source]#
- open work space. file name load automatical from UI ui; ui.file(“file.workspace”);
- SaveWorkSpace()[source]#
- save work space. file name save automatical from UI ui; ui.file(“file.workspace”);
- OpenDialog(extensions: str, result: str)[source]#
- function returns true if file is successfully chosen
- SaveDialog(extensions: str, result: str)[source]#
- function returns true if file is successfully chosen
- SetFileForFileDialogs(name: str)[source]#
- Use empty name “” to stop automatic file dialogs skipping othervice all next file dialogs will be skipped and it may lead to loosing data.
- CompareImages(im1: str, im2: str, tolerance: int = 1)[source]#
- then they are equal, otherwise not equal.
- CompareImagesEx(im1: str, im2: str, tolerance: int, result: str)[source]#
- The parameter result contains the list of points <Point_i(Xi,Yi) with different values.
- ForEachFileInFolder(Folder: str, ExtList: str, Callback: str)[source]#
- Ext list contains list of extensions like “.jpg;.png”
- cmd(ID: str)[source]#
- Performs any action from user interface. To get ID of command hover required item with mouse and press MMB. Command ID will be copied to clipboard. Pay attention that if command is not present in current UV layout it will not be performed.
- vertexpaint(path: str)[source]#
- Import mesh for vertex painting, if path is empty dialog will be shown
- repair(id: str)[source]#
- Opens mesh for repairing. If id contains “vox” then model will be voxelized, if there is substring “shell” then mesh will be imported as thin shell. Mesh Opening dialog will be shown.
- activate(id: str)[source]#
- Activate special voxel tool. id may be found in English.xml between <ID>…</ID> if you will find name of tool between <Text>…</Text> tags
- ToRoom(name: str)[source]#
- Activate any room - name is one of “Paint”, “Tweak”, “UV”, “Retopo”, “Render”
- AddNewVolume(name: str)[source]#
- add new volume in voxel room. If name is empty name will be assigned automatically.
- PrimScaleAt(x: float, y: float, z: float, scalex: float, scaley: float, scalez: float)[source]#
- scale all further low-level primitives using pivot point x,y,z
- PrimRotateX(x: float, y: float, z: float, Angle: float)[source]#
- Rotate further primitives at xyz point around X-axis
- PrimRotateY(x: float, y: float, z: float, Angle: float)[source]#
- Rotate further primitives at xyz point around Y-axis
- PrimRotateZ(x: float, y: float, z: float, Angle: float)[source]#
- Rotate further primitives at xyz point around Z-axis
- PrimRotateAroundRode(x: float, y: float, z: float, xend: float, yend: float, zend: float, Angle: float)[source]#
- Rotate further primitives around rode (x,y,z)->(xend,yend,zend) on given Angle
- PrimStretchBetweenPoints(x: float, y: float, z: float, xend: float, yend: float, zend: float)[source]#
- be actually applied as primitive stretched between points (x,y,z) and (xend,yend,zend)
- PrimDensity(density: float)[source]#
- set additional density factor for low-level primitives. 1 means default density.
- GetPrimTransform()[source]#
- store current transform for primitives as string to be kept for future usage
- SetPrimTransform(M: str)[source]#
- restore current primitives transform from string that was previously kept using GetPrimTransform
- sphere1(r: float)[source]#
- restore current primitives transform from string that was previously kept using GetPrimTransform
- mk_sphere(x: float, y: float = 0, z: float = 0, r: float = 0, mode: int = -1)[source]#
- mode==0 - add, 1 - subtract, 2 - intersect
- mk_ellipse(x: float, y: float, z: float, rx: float, ry: float, rz: float, mode: int)[source]#
- mode==0 - add, 1 - subtract, 2 - intersect
- mk_cube(x: float, y: float, z: float, sizex: float, sizey: float, sizez: float, mode: int)[source]#
- mode==0 - add, 1 - subtract, 2 - intersect
- mk_cylinder(x: float, y: float, z: float, topradius: float, bottomradius: float, height: float, mode: int)[source]#
- create cylinder
- mk_ngon(x: float, y: float, z: float, sides: int, topradius: float, bottomradius: float, height: float, mode: int)[source]#
- create nngon
- mk_tube(x: float, y: float, z: float, topradius: float, bottomradius: float, height: float, wallthickness: float, mode: int)[source]#
- create tube
- mk_ngontube(x: float, y: float, z: float, sides: int, topradius: float, bottomradius: float, height: float, wallthickness: float, mode: int)[source]#
- create n-gonal tube
- mk_capsule(x: float, y: float, z: float, xend: float, yend: float, zend: float, startradius: float, endradius: float, mode: int)[source]#
- creates capsule between points
- ApplyAndKeepScale()[source]#
- Apply in Merge tool withous asking “Keep scale?”. Scale will not be kept and scene scale will not be changed
- WasRecentlyPressed(ID: str, Time: float)[source]#
- Was widget with identifier ID recently (within last Time sec) pressed?
- WasRecentlyRMBPressed(ID: str, Time: float)[source]#
- Was widget with identifier ID recently (within last Time sec) pressed via RMB?
- IsInTool(ToolID: str)[source]#
- Is user in tool identified as ID? To get current tool identifier press RMB+MMB over empty field
- FindRecentlyPressed(IDS: str, Time: float)[source]#
- Find the widget that was pressed recently. IDS - strings ids. Return index of widget.
- DrawScreenLine(x1: float, y1: float, x2: float, y2: float, Color1: int, Color2: int)[source]#
- Draw line on screen - only to use after Step() instruction in cycle, othervice use will not see anything
- DrawScreenRect(x1: float, y1: float, x2: float, y2: float, Color: int)[source]#
- Draw filled rectangle
- DrawScreenCircle(x: float, y: float, Radius: float, FillColor: int, LineColor: int)[source]#
- draw circle
- DrawTextOnScreen(x: float, y: float, Color: int, align: int, text: str)[source]#
- draw text on screen, align=0 - left aligned, 1 - central align, 2 - right align
- HighlightUIElementsPY(IDS: str, time: float, explain: str, uType: int, Callback: any, callPressed: bool)[source]#
- highlighting the ui elements in python
- HighlightUIElements(IDS: str, time: float, explain: str, utype: int, Callback: str, callPressed: bool = True)[source]#
- highlighting the ui elements
- HighlightUIBoolTreeElement(type: int, i: int, time: float)[source]#
- highlighting the bool element in tree branch (type & index = i)
- HighlightUIBoolTreeElements(type: int, time: float, explain: str, uType: int, Callback: str, callPressed: bool = True)[source]#
- highlighting the ui bool elements in the tree branch
- WasDragNDropVoxTree(explain: str, dragMode: int)[source]#
- Was drag&drop vox tree (dragmode = 1 add, 2 sub,3 - duplicate)
- SetCurVolumeMode(Surf: bool, Silent: bool, suggestedpoly: int = 0)[source]#
- If silent=true then no dialogs will be shown, all will be done by default
- IsChangeName(name: str, i: int)[source]#
- check current change volume by index from name, returns true if changed
- SelectFirstVolume(OnlyVisible: bool)[source]#
- select first volume in scene, if OnlyVisible==true then first visible volume will be selected
- SelectNextVolume(OnlyVisible: bool)[source]#
- select next volume after current in tree, if OnlyVisible==true then next visible volume will be selected. Returns false if current volume is last in list
- SetVolumeOpacity(Opacity: float)[source]#
- set opacity to current volume if the shader has corresponding property
- SetVolumeColor(Color: int)[source]#
- set current volume color if this property of shader is available
- SelectPaintLayer(ID: str)[source]#
- select paint layer with name ID. Returns false if layer not found.
- SelectFirstPaintLayer(visible: bool)[source]#
- select lowest paint layer. If visible=true, first visible paint layer will be selected
- SelectNextPaintLayer(visible: bool)[source]#
- select next paint layer. Returns false if current layer is last and no new layer was selected.
- SetPaintLayerBlendingMode(ID: str)[source]#
- set blending mode of the current paint layer - ID-s are same as in English version
- SetPaintLayerDepthBlendingMode(ID: str)[source]#
- set depth blending mode of the current paint layer - ID-s are same as in English version
- SelectRetopoLayer(ID: str)[source]#
- select retopo layer with name ID. Returns false if layer not found.
- SelectFirstRetopoLayer(visible: bool)[source]#
- select lowest retopo layer. If visible=true, first visible retopo layer will be selected
- SelectNextRetopoLayer(visible: bool)[source]#
- select next retopo layer. Returns false if current layer is last and no new layer was selected.
- Execute(command: str, parameters: str)[source]#
- execute exe file or perform some action like open browser window etc
- InstallToMenu(path: str, ItemName: str)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddFloatSlider(VariableName: str, Min: float, Max: float)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddIntSlider(VariableName: str, Min: int, Max: int)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddFloatInput(VariableName: str, EmptyName: bool)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddIntInput(VariableName: str, EmptyName: bool)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddStringInput(VariableName: str, EmptyName: bool)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddTextField(TextID: str, Align: int)[source]#
- creates new menu item and will run this script. Path is just path to menu like File.Export or Voxels or Retopo
- AddTranslation(ID: str, Text: str)[source]#
- CaseList is list of possible values for droplist, delimiters are ,;|
- UICondition(function: str)[source]#
- CaseList is list of possible values for droplist, delimiters are ,;|
- GetMouseX()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.GetMouseX
- GetMouseY()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.GetMouseY
- LMBPressed()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.LMBPressed
- RMBPressed()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.RMBPressed
- MMBPressed()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.MMBPressed
- WheelPressed()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.WheelPressed
- GetVisiblePenRadius()[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.GetVisiblePenRadius
- ScreenRayPicksObject(x: float, y: float)[source]#
- Screen - based direct control over mouse
Expand for references to
cPy.Legacy.ScreenRayPicksObject
- UvSetForExportImport(Name: str)[source]#
- Call it each time you need to perform the command from Textures->Import
- ImportTexture(CommandInMenu: str, UvSetName: str, PathToTexture: str)[source]#
- The command allows to use all commands from Texture->Import without triggering the dialog
- Parameters:
menu (CommandInMenu - command from Textures->Import)
$LOADTEX (for example)
$LOADROUGHNESS
etc
Textures->Import (anything from)
texture (PathToTexture - full path to the)
texture